package com.zhuiyun.project.api.filemanage.service;


import com.zhuiyun.project.api.filemanage.entity.FileManage;
import com.zhuiyun.project.common.errorCode.CommonException;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartRequest;

import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;

/**
 * @ClassName fileManageService
 * @Description TODO
 * @Author kdj
 * @Date 2023/6/23 9:04
 **/
public interface FileManageService {


    /**
     * @param fileManage
     * @Author kdj
     * @Description 新增图片
     * @Date 2023/6/23 9:06
     * @Return boolean
     */
    boolean addFile(FileManage fileManage);


    /**
     * @param multipartRequest
     * @Author kdj
     * @Description 用户图片上传
     * @Date 2023/6/27 9:23
     * @Return java.lang.Integer
     */
    Integer uploadFile(MultipartRequest multipartRequest);


    /**
     * 获取视频id
     *
     * @return void
     * @author 温
     * @date 2023/7/13 21:00
     * @parameter [response, id]
     */
    void getVideoById(HttpServletResponse response, Integer id) throws CommonException, FileNotFoundException;


    /**
     * 视频上传
     *
     * @param file
     * @param projectName
     * @return
     * @throws CommonException
     */
    FileManage saveFileToSystem(MultipartFile file, String projectName) throws CommonException;


    /**
    * @Author kdj
    * @Description 用户图片上传
    * @Date 2023/7/27 10:27
    * @Return java.lang.Integer
    * @param multipartFile
    */
    Integer uploadFile(MultipartFile multipartFile);
}
